package home_work1;

public class test01 {

	public static void main(String[] args) {
		String str = "HelloWorld";
		test1(str);
		test2(str);
		test3(str);
	}
	
	
	
	public static void test1(String str){
	System.out.println(str.length());
	System.out.println(str.indexOf("o"));
	System.out.println(str.lastIndexOf("o"));
	System.out.println(str.indexOf("o",5));
	}
	public static void test2(String str) {
		String str2="  Hello   ";
		System.out.println((str.substring(str.indexOf("He"),str.indexOf("lo")+2)));
		System.out.println((str.substring(str.indexOf("Wo"),str.indexOf("ld")+2)));
		System.out.println(str2.trim());
	}
    public static void test3(String str) {
    	System.out.println(str.charAt(6));
    	System.out.println(str.endsWith("ld"));
    	System.out.println(str.startsWith("h"));
    	System.out.println(str.toLowerCase());
    	System.out.println(str.toUpperCase());
	}

}
